package snakesladders.visual;

import java.util.ArrayList;
import java.util.List;

import minidraw.boardgame.BoardActionTool;
import minidraw.boardgame.BoardDrawing;
import minidraw.framework.DrawingEditor;
import minidraw.standard.MiniDrawApplication;
import snakesladders.domain.Game;
import snakesladders.domain.GameImpl;
import snakesladders.domain.Square;
import snakesladers.view.SnakesAndLaddersFactory;

public class Snake {

	public static void main(String[] args) {
		Game game = new GameImpl();
		DrawingEditor editor = new MiniDrawApplication("A simple snake game ...", 
				new SnakesAndLaddersFactory(game));
		editor.open();
		editor.setTool(new BoardActionTool(editor));
		
		// hvad sker der her med Genrics, hvorfor Square ??
		BoardDrawing<Square> drawing = (BoardDrawing<Square>) editor.drawing();

		game.addObserver(drawing);
	}
	
}
